Switch to pathlib to fix Win compatibility#20
Merged
Xarthisius merged 1 commit intomainfrom Mar 16, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20 +/- ##
==========================================
+ Coverage 91.50% 91.61% +0.11%
==========================================
Files 3 3
Lines 506 513 +7
==========================================
+ Hits 463 470 +7
Misses 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the codebase to replace usage of the
osmodule with thepathlibmodule for file and path operations, enhancing cross-platform compatibility and code readability. It also improves path handling logic in several places, especially for subpath filtering and file verification. Additionally, some minor variable adjustments and ordering fixes are included.Migration from
ostopathlibfor file and path operations:tro_utils/cli.pyandtro_utils/tro_utils.pynow usepathlibinstead ofos, improving cross-platform robustness and code clarity. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] Fcb9268dL321R322)Improvements to path handling logic:
verify_replication_packagenow usespathlib.PurePosixPath.relative_tofor robust and accurate filtering, preventing errors with path substring logic.base_filenameproperty and related filename manipulations now usepathlibfor resolving absolute paths.Bug fixes and minor adjustments:
verify_replication_packagewas corrected to match expected output. [1] [2]subpathinverify_packagewas changed from an empty string toNonefor clarity and correctness.generate_reportwas simplified for readability.